/*
 * EquilibriumConstantData.h
 *
 *  Created on: 31 Jul 2011
 *      Author: Allan
 */

#ifndef EQUILIBRIUMCONSTANTDATA_H_
#define EQUILIBRIUMCONSTANTDATA_H_

// C++ includes
#include <functional>
#include <vector>
using namespace std;

class EquilibriumConstantData
{
public:
	EquilibriumConstantData();
	
	EquilibriumConstantData(double logK);
	
	EquilibriumConstantData(double logK, double T);
	
	EquilibriumConstantData(const vector<double>& logKi, const vector<double>& Ti);
	
	EquilibriumConstantData(const std::function<const double(double T, double P)>& K);
	
	void
	GetData(vector<double>& logKi, vector<double>& Ti) const;
	
	const double
	operator()(double T, double P) const;
	
private:
	vector<double> logKi, Ti;
	
	std::function<const double(double T, double P)> K;
	
	bool knownFunctional;
};

#endif /* EQUILIBRIUMCONSTANTDATA_H_ */
